package com.woniuxy.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.woniuxy.controller.form.*;
import com.woniuxy.controller.info.ProjectnameInfo;
import com.woniuxy.controller.info.UserAndAccountInfo;
import com.woniuxy.controller.info.UserAndRoleInfo;
import com.woniuxy.controller.info.UserAndRolesInfo;
import com.woniuxy.controller.form.ProjectIdForm;
import com.woniuxy.controller.info.UserAndRoleInfo;
import com.woniuxy.controller.form.ProjectIdForm;
import com.woniuxy.controller.info.UserAndRoleInfo;
import com.woniuxy.model.RoleModel;
import com.woniuxy.model.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.utils.MyException;

import java.util.List;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 马世亮
 * @since 2022-02-15
 */
public interface UserService extends IService<User> {
    List<UserAndRoleInfo> getUsers(ProjectIdForm projectIdForm);

    boolean giveUserRole(UserNewRoleForm userNewRoleForm) throws MyException;

    IPage<UserAndRolesInfo> getUserAndRole(ProjectIdForm projectIdForm);

    boolean removerole(UserRoleForm userRoleForm);

    List<User> getuserByinfo(String userinfo);

    boolean addnewuser(NewuserForm newuserForm) throws MyException;

    IPage<UserAndAccountInfo> getAllusers(PageForm pageForm);

    boolean changeuser(UserChangeForm userChangeForm) throws MyException;

    boolean removeuser(UserAndAccountInfo userAndAccountInfo) throws MyException;

    boolean removemany(UserManyForm userManyForm) throws MyException;

    RoleModel ismanager(Integer uid);


    List<UserAndRolesInfo> getHasroleUser(Integer pid);

    boolean changeuserrole(UserNewRoleForm userNewRoleForm) throws MyException;
}
